#ifndef COLORPICKER_H
#define COLORPICKER_H

#include <QDialog>
#include "widgetcouleur.h"

namespace Ui {
    class ColorPicker;
}

class ColorPicker : public QDialog
{
    Q_OBJECT

public:
    explicit ColorPicker(QRgb couleur, WidgetCouleur *parent = 0);
    ~ColorPicker();
    QColor couleur;
    WidgetCouleur* wc;

private slots:
    void on_spinC_valueChanged(int arg1);
    void on_spinM_valueChanged(int arg1);
    void on_spinJ_valueChanged(int arg1);
    void on_spinK_valueChanged(int arg1);

    void on_spinR_valueChanged(int arg1);
    void on_spinG_valueChanged(int arg1);
    void on_spinBl_valueChanged(int arg1);

    void on_spinH_valueChanged(int arg1);
    void on_spinS_valueChanged(int arg1);
    void on_spinBr_valueChanged(int arg1);

    void on_spinY_valueChanged(int arg1);
    void on_spinU_valueChanged(int arg1);
    void on_spinV_valueChanged(int arg1);

    void on_lineEdit_textChanged(const QString &arg1);

private:
    Ui::ColorPicker *ui;
    void updateValeurs(const int id);
    void updateCMJK(QColor couleur);
    void updateHSB(QColor couleur);
    void updateRGB(QColor couleur);
    void updateYUV(QColor couleur);


    static const int kRGB=0;
    static const int kHSB=1;
    static const int kCMJK=2;
    static const int kYUV=3;
    static const int kHex=4;
};

#endif // COLORPICKER_H
